# -*- coding: utf-8 -*-
# @Time    : 2025/4/21 1:30
# @Author  : yxb
# @Email   : 18282090563@163.com
# @File    : utils.py
# @Software: PyCharm

from appium import webdriver
from appium.options.android import UiAutomator2Options


def start_app(capabilities):
    appium_server_url = 'http://127.0.0.1:4723'
    driver = webdriver.Remote(appium_server_url,options=UiAutomator2Options().load_capabilities(capabilities))
    return driver



if __name__ == '__main__':
    import json
    from config.config import xiachufang_app
    print(json.dumps(xiachufang_app,indent=4))
























